<?php

namespace app\common\validate;

use think\Validate;

class Product extends BaseValidate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'category_id' => ['number', '>:0'],
        'product_id'  => ['require', 'number', '>:0'],
        'qty'         => ['require', 'number', '>:0'],
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'list'       => ['category_id'],
        'submitOrder' => ['product_id', 'qty'],
    ];
    
}
